local config = require 'next.config'
local merge_tb = vim.tbl_deep_extend
local plugins
local opts = {
  root = config.plugins.install_path,
  dev = {
    path = vim.fn.stdpath("config") .. "/local-plugins"
  }
}
if config.plugins.prefer == 'gitee' then
  plugins = require 'next.plugins.gitee'
  opts = merge_tb('force', opts, {
    git = {
      url_format = 'https://gitee.com/%s.git'
    },
  })
elseif config.plugins.prefer == 'github' then
  plugins = require 'next.plugins.github'
  opts = merge_tb('force', opts, {
    git = {
      url_format = 'https://github.com/%s.git'
    }
  })
end
require('lazy').setup(plugins, opts)

